import request from '@/utils/request'

/** *
 * 获取权限列表
 * **/

export const getPermissionListApi = () => {
  return request.get('/sys/permission')
}

// 添加权限
export const addPermissionApi = (data) => {
  return request.post('/sys/permission', data)
}

// 获取权限详情
export const getPermissionDetailApi = (id) => {
  return request.get(`/sys/permission/${id}`)
}

// 更新权限
export const updatePermissionApi = (data) => {
  return request.put(`/sys/permission/${data.id}`, data)
}

// 删除权限
export const delPermissionApi = (id) => {
  return request.delete(`/sys/permission/${id}`)
}
